/**
 * 2019-05-04 10:57:00
 */
package com.cdxy.model.dto.message;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.List;

/**
 * Esion
 */
@ApiModel(description = "返回的分页对象")
public class PageInfo<T> implements Serializable {
    private static final long serialVersionUID = -3444373331108717239L;
    @ApiModelProperty(value = "当前页")
    private int current;
    @ApiModelProperty(value = "每一页数量")
    private int size;
    @ApiModelProperty(value = "总共多少条")
    private long total;
    @ApiModelProperty(value = "总共多少页")
    private long pages;
    List<T> records;

    /**
     *
     */
    public PageInfo() {
        super();
    }

    /**
     * @param current
     * @param size
     * @param total
     * @param pages
     * @param records
     */
    public PageInfo(int current, int size, long total, long pages, List<T> records) {
        this.current = current;
        this.size = size;
        this.total = total;
        this.pages = pages;
        this.records = records;
    }

    public int getCurrent() {
        return current;
    }

    public void setCurrent(int current) {
        this.current = current;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public long getTotal() {
        return total;
    }

    public void setTotal(long total) {
        this.total = total;
    }

    public long getPages() {
        return pages;
    }

    public void setPages(long pages) {
        this.pages = pages;
    }

    public List<T> getRecords() {
        return records;
    }

    public void setRecords(List<T> records) {
        this.records = records;
    }
}
